<?php

namespace app\common\model;

/**
 * Class MemberAsk
 * @package app\model
 * @property int	$id
 * @property int	$memberId
 * @property int	$lawyerId
 * @property int	$cateId
 * @property int	$askWay
 * @property string	$tags
 * @property int	$provinceId
 * @property int	$cityId
 * @property string	$phone
 * @property int	$appointTime
 * @property int	$consultationContent
 * @property int	$isNotify
 * @property string	$uploadPics
 * @property string	$charge
 * @property int	$isPay
 * @property int	$orderId
 * @property int	$questionsNum
 * @property int	$status
 * @property int	$isEnd
 * @property int	$stateTime
 * @property int	$endTime
 * @property int	$checkStatus
 * @property int	$roomId
 * @property int	$isComment
 * @property string	$ask
 * @property float	$thanksFee
 * @property int	$rank
 * @property int	$canRush
 * @property int	$canDepth
 * @property int	$depthMemberId
 * @property int	$isDel
 * @property int	$rePayType
 * @property int	$isRedPacket
 * @property int	$serviceType
 * @property string	$ip
 * @property int	$cases
 * @property int	$isFinish
 * @property int	$updated
 * @property int	$created
 * @property int	$chatTime
 * @link https://www.kancloud.cn/manual/thinkphp6_0/1037579
 * @link https://www.kancloud.cn/manual/think-orm/1257998
 * @link https://www.kancloud.cn/thinkphp/master-database-and-model/265551
 * @deprecated 这个模型干掉了
 */
class MemberAsk extends \app\common\model\BaseModel
{
    protected $name = 'MemberAsk';

    public function province()
    {
        return $this->hasOne(Area::class, 'id', 'provinceId');
    }

    public function city()
    {
        return $this->hasOne(Area::class, 'id', 'cityId');
    }

    public function member()
    {
        return $this->belongsTo(Member::class, 'memberId', 'id');
    }

    /**
     * 1对1
     * @return \think\model\relation\HasOne
     */
    //    public function one(){
    //        return $this->hasOne( Test1::class, 'Test1表中的键', 'MemberAsk表中的键');
    //    }

    /**
     * 1对多
     * @return \think\model\relation\HasMany
     */
    //    public function many(){
    //        return $this->hasMany( Test1::class, 'Test1表中的键', 'MemberAsk表中的键');
    //    }

    /**
     * 多对多
     * @return \think\model\relation\BelongsToMany
     */
    //    public function belongs(){
    //        return $this->belongsToMany( Test1::class, '中间表', '中间表中Test1的键', '中间表中MemberAsk的键');
    //    }
}
